import request from '@/utils/request'

export function fetchList(listQuery) {
    return request({
      url: '/getNoticeInfo',
      method: 'post',
      params: {
        pageNum: listQuery.page,
        pageSize: listQuery.limit
      }
    })
  }

  export function fetchDetailList(id) {
    return request({
      url: '/getNoticeDetailInfo',
      method: 'post',
      params: {
        id
      }
    })
  }

  export function updateNotice(data,token) {
    return request({
      url: '/insertNoticeDetailInfo',
      method: 'post',
      data,
      params: {
        token
      }
    })
  }
  
  export function saveNotice(data,token) {
    return request({
      url: '/saveNoticeDetailInfo',
      method: 'post',
      data,
      params: {
        token
      }
    })
  }
  
  export function fetchDataDetail(id) {
    return request({
      url: '/getNoticeDetailInfo',
      method: 'post',
      params: {
        id
      }
    })
  }
  
  export function deleteDataDetail(id) {
    return request({
      url: '/deleteNoticeInfo',
      method: 'post',
      params: {
        id
      }
    })
  }

  